<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <title></title>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <link rel="stylesheet" type="text/css" href="../resources/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="../resources/css/bootstrap-datetimepicker.min.css">
    <link rel="stylesheet" href="../resources/css/grumble.css">

    <script type="text/javascript" src="../resources/scripts/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="../resources/scripts/bootstrap.js"></script>
    <script type="text/javascript" src="../resources/scripts/bootstrap-datetimepicker.min.js"></script>
    <script type="text/javascript" src="../resources/scripts/bootstrap-datetimepicker.zh-CN.js"></script>
    <script type="text/javascript" src="../resources/scripts/jquery.grumble.min.js"></script>
    <script type="text/javascript" src="../resources/scripts/zhBase.js"></script>
    <script type="text/javascript" src="../resources/scripts/zhForm.js"></script>
    <script>
        $(function(){

            /**
            * 提交后的响应函数
            * @param data 服务器返回
             */
            function deal(data){
                alert(data.msg);
            }
            var zf = new zhForm($("#formId"));
            $("#btnid").click(function(){
                var isSuccess= zf.verify();
                if(isSuccess)
                {
                    zf.submitForm(deal);
                }
            });
        });
    </script>
</head>
<body>
<div style="margin: 20px 0;"></div>


<div class="container">
    <form action="/sys/example/submit.do" id="formId" class="form-horizontal"  role="form">
        <div class="row">
            <div class="col-xs-12">
                <div class="form-group">
                    <label for="inputEmail1" class="col-sm-2 control-label">姓名</label>
                    <div class="col-sm-10">
                        <input name="name" type="text" notNull="true" class="form-control" id="inputEmail1" placeholder="Email">
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-xs-12">
                <div class="form-group">
                    <label for="textarea1" class="col-sm-2 control-label">Email</label>
                    <div class="col-sm-10">
                        <textarea name="content" class="form-control" notNull="true" id="textarea1" rows="3"></textarea>
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-xs-6">
                <div class="form-group">
                    <label for="inputEmail2" class="col-sm-2 control-label">Email</label>
                    <div class="col-sm-10">
                        <input  name="email" type="text" class="form-control" id="inputEmail2" placeholder="Email">
                    </div>
                </div>
            </div>
            <div class="col-xs-6">
                <div class="form-group">
                    <label for="inputEmail3" class="col-sm-2 control-label">Email</label>
                    <div class="col-sm-10">
                        <input  name="email2" type="text" class="form-control" id="inputEmail3" placeholder="Email">
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-xs-4">
                <div class="form-group">
                    <div class="input-group">
                        <div class="input-group-addon">姓名</div>
                        <input name="name2" class="form-control" notNull="true" type="text" placeholder="Enter email">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <div class="input-group">
                        <div class="input-group-addon">姓名</div>
                        <input  name="name3" class="form-control" type="text" placeholder="Enter email">
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <div class="form-group">
                    <div class="input-group">
                        <div class="input-group-addon">姓名</div>
                        <input  name="name4" class="form-control" type="text" placeholder="Enter email">
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-xs-4">
                <div class="form-group">
                    <div class="input-group">
                        <div class="input-group-addon">性别</div>
                        <select name="sex" class="form-control" notNull="true">
                            <option value="" selected></option>
                            <option value="1">男</option>
                            <option value="0">女</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-xs-4">
                <label class="radio-inline ">
                    <input name="radio"  type="radio" notNull="true" value="option1"> 单选1
                </label>
                <label class="radio-inline">
                    <input name="radio" type="radio"  value="option2"> 单选2
                </label>
            </div>
            <div class="col-xs-4">
                <div class="checkbox">
                    <label>
                        <input name="checkName" minNum="0" maxNum="2" value="1" type="checkbox"> Remember me
                    </label>
                    <label>
                        <input name="checkName" value="2" type="checkbox"> Remember me
                    </label>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-xs-4">
                <button type="button" id="btnid" class="btn btn-success btn-block">提交</button>
            </div>
            <div class="col-xs-4">
                <button type="button" class="btn btn-default btn-lg">提交</button>
                <button type="button" class="btn btn-danger ">提交</button>
            </div>
            <div class="col-xs-4">
                <button type="button" class="btn btn-info btn-sm">提交</button>
                <button type="button" class="btn btn-warning btn-xs">提交</button>
            </div>

        </div>

    </form>
</div>
</body>
</html>
